import request from '@/utils/request';

// 查询操作日志列表
export function list(data, query) {
  return request({
    url: '/web/monitor/audit/operlog/page',
    method: 'post',
    params: query,
    data: data,
    encryptReq: true,
    hmacReq: true,
    decryptRes: true,
  });
}

// 删除操作日志
export function delOperlog(operId) {
  return request({
    url: '/web/monitor/audit/operlog/delete/' + operId,
    method: 'post',
  });
}

// 清空操作日志
export function cleanOperlog() {
  return request({
    url: '/web/monitor/audit/operlog/clean',
    method: 'post',
  });
}

// 导出
export function exportOperlog(data, params) {
  return request({
    url: '/web/monitor/audit/operlog/export',
    method: 'post',
    data,
    params,
    responseType: 'blob',
    filename: `operlog_${new Date().getTime()}.xlsx`,
  });
}
